/**
 * This file is used specifically and only for development. It installs
 * `electron-debug` & `vue-devtools`. There shouldn't be any need to
 *  modify this file, but it can be used to extend your development
 *  environment.
 */
import { app } from 'electron'
import electronDebug from 'electron-debug';

// Install `electron-debug` with `devtron`
electronDebug({ showDevTools: false })

/* eslint-disable */
/*app.on('browser-window-created', (event, win) => {
  /// Workaround for https://github.com/electron/electron/issues/12438
  win.webContents.once('dom-ready', () => {
    win.webContents.openDevTools();
  });
});*/

// Install `vue-devtools`
app.on('ready', () => {
  let installExtension = require('electron-devtools-installer')
  installExtension.default(installExtension.VUEJS_DEVTOOLS)
    .then(() => {})
    .catch(err => {
      console.log('Unable to install `vue-devtools`: \n', err)
    })
});

// Require `main` process to boot app
require('./index')
